package com.IODemo.CharStream;

import java.io.*;

/**
 * @Author milian
 * @Date 2021/7/27 0027 20:38
 */
public class BufferedFileReaderDemo {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("H:\\test\\test.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("H:\\test\\test1.txt"));
        char[] chars = new char[1024];
        String len;
//        int len;
//        while ((len= br.read(chars))!=-1){
//            System.out.println(new String(chars,0,len));
//        }
        while ((len = br.readLine()) != null) {
            bw.write(chars);
        }
        bw.close();
        br.close();
    }
}
